#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import lesson_blueprint
from api_1_0.lessonResource.lessonResource import LessonResource
from api_1_0.lessonResource.lessonOtherResource import LessonUpdateResource, LessonAddResource, LessonDelResource

api = Api(lesson_blueprint)

api.add_resource(LessonResource, '/lesson/<lesson_id>', '/lesson', endpoint='Lesson')


@lesson_blueprint.route('/lesson/update/<lesson_id>', methods=['PUT'], endpoint='LessonUpdate')
def update(lesson_id):
    return LessonUpdateResource.update(lesson_id)


# 添加班级
api.add_resource(LessonAddResource, '/lesson/add', endpoint='add_lesson')

# 删除班级
api.add_resource(LessonDelResource, '/lesson/delete', endpoint='delete_lesson')